using FluentNHibernate.Conventions;
using FluentNHibernate.Mapping;

namespace Webshop20.Infrastructure.Persistence.NH.AutoMappings.Conventions.Particular
{
    public class ProductConventions : IPropertyConvention
    {
        public bool Accept(IProperty target)
        {
            return target.EntityType.Name == "Product";
        }

        public void Apply(IProperty target)
        {
            if (target.Property.Name == "Description")
                target.CustomSqlTypeIs("text");
        }
    }
}